package com.neudu.yiyang.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName nurserecord
 */
@TableName(value ="nurserecord")
@Data
public class Nurserecord implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 逻辑删除标记（0：显示；1：隐藏）
     */
    private Integer isDeleted;

    /**
     * 客户ID
     */
    private Integer customerId;

    /**
     * 护理项目ID
     */
    private Integer itemId;

    /**
     * 护理时间
     */
    private Date nursingTime;

    /**
     * 护理内容
     */
    private String nursingContent;

    /**
     * 护理数量
     */
    private Integer nursingCount;

    /**
     * 护理人员ID
     */
    private Integer userId;

    /**
     * 上期剩余数量
     */
    private Integer lastRemainingCount;

    /**
     * 本期剩余数量
     */
    private Integer currentRemainingCount;

    /**
     * 购买时间
     */
    private Date purchaseTime;

    /**
     * 购买次数
     */
    private Integer purchaseCount;

    /**
     * 总购买次数
     */
    private Integer totalCount;

    /**
     * 备注
     */
    private String remark;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Integer getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Integer customerId) {
        this.customerId = customerId;
    }

    public Integer getItemId() {
        return itemId;
    }

    public void setItemId(Integer itemId) {
        this.itemId = itemId;
    }

    public Date getNursingTime() {
        return nursingTime;
    }

    public void setNursingTime(Date nursingTime) {
        this.nursingTime = nursingTime;
    }

    public String getNursingContent() {
        return nursingContent;
    }

    public void setNursingContent(String nursingContent) {
        this.nursingContent = nursingContent;
    }

    public Integer getNursingCount() {
        return nursingCount;
    }

    public void setNursingCount(Integer nursingCount) {
        this.nursingCount = nursingCount;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getLastRemainingCount() {
        return lastRemainingCount;
    }

    public void setLastRemainingCount(Integer lastRemainingCount) {
        this.lastRemainingCount = lastRemainingCount;
    }

    public Integer getCurrentRemainingCount() {
        return currentRemainingCount;
    }

    public void setCurrentRemainingCount(Integer currentRemainingCount) {
        this.currentRemainingCount = currentRemainingCount;
    }

    public Date getPurchaseTime() {
        return purchaseTime;
    }

    public void setPurchaseTime(Date purchaseTime) {
        this.purchaseTime = purchaseTime;
    }

    public Integer getPurchaseCount() {
        return purchaseCount;
    }

    public void setPurchaseCount(Integer purchaseCount) {
        this.purchaseCount = purchaseCount;
    }

    public Integer getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Integer totalCount) {
        this.totalCount = totalCount;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    private Customer customer;

    public String getCustomerName() {
        return customer != null ? customer.getCustomerName() : null;
    }

    @TableField("status")
    private String status;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Nurserecord other = (Nurserecord) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()))
            && (this.getCustomerId() == null ? other.getCustomerId() == null : this.getCustomerId().equals(other.getCustomerId()))
            && (this.getItemId() == null ? other.getItemId() == null : this.getItemId().equals(other.getItemId()))
            && (this.getNursingTime() == null ? other.getNursingTime() == null : this.getNursingTime().equals(other.getNursingTime()))
            && (this.getNursingContent() == null ? other.getNursingContent() == null : this.getNursingContent().equals(other.getNursingContent()))
            && (this.getNursingCount() == null ? other.getNursingCount() == null : this.getNursingCount().equals(other.getNursingCount()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getLastRemainingCount() == null ? other.getLastRemainingCount() == null : this.getLastRemainingCount().equals(other.getLastRemainingCount()))
            && (this.getCurrentRemainingCount() == null ? other.getCurrentRemainingCount() == null : this.getCurrentRemainingCount().equals(other.getCurrentRemainingCount()))
            && (this.getPurchaseTime() == null ? other.getPurchaseTime() == null : this.getPurchaseTime().equals(other.getPurchaseTime()))
            && (this.getPurchaseCount() == null ? other.getPurchaseCount() == null : this.getPurchaseCount().equals(other.getPurchaseCount()))
            && (this.getTotalCount() == null ? other.getTotalCount() == null : this.getTotalCount().equals(other.getTotalCount()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        result = prime * result + ((getCustomerId() == null) ? 0 : getCustomerId().hashCode());
        result = prime * result + ((getItemId() == null) ? 0 : getItemId().hashCode());
        result = prime * result + ((getNursingTime() == null) ? 0 : getNursingTime().hashCode());
        result = prime * result + ((getNursingContent() == null) ? 0 : getNursingContent().hashCode());
        result = prime * result + ((getNursingCount() == null) ? 0 : getNursingCount().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getLastRemainingCount() == null) ? 0 : getLastRemainingCount().hashCode());
        result = prime * result + ((getCurrentRemainingCount() == null) ? 0 : getCurrentRemainingCount().hashCode());
        result = prime * result + ((getPurchaseTime() == null) ? 0 : getPurchaseTime().hashCode());
        result = prime * result + ((getPurchaseCount() == null) ? 0 : getPurchaseCount().hashCode());
        result = prime * result + ((getTotalCount() == null) ? 0 : getTotalCount().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", customerId=").append(customerId);
        sb.append(", itemId=").append(itemId);
        sb.append(", nursingTime=").append(nursingTime);
        sb.append(", nursingContent=").append(nursingContent);
        sb.append(", nursingCount=").append(nursingCount);
        sb.append(", userId=").append(userId);
        sb.append(", lastRemainingCount=").append(lastRemainingCount);
        sb.append(", currentRemainingCount=").append(currentRemainingCount);
        sb.append(", purchaseTime=").append(purchaseTime);
        sb.append(", purchaseCount=").append(purchaseCount);
        sb.append(", totalCount=").append(totalCount);
        sb.append(", remark=").append(remark);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}